﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WiiGeeTest
{
  public partial class GestureCreator : Form
  {
    public String GestureName
    {
      set;
      get;
    }
    public GestureCreator()
    {
      InitializeComponent();
    }

    private void cmdStoreGesture_Click(object sender, EventArgs e)
    {
      GestureName = txtGestureName.Text;
      this.DialogResult = DialogResult.OK;
    }

    private void cmdCancelGesture_Click(object sender, EventArgs e)
    {
      this.DialogResult = DialogResult.Cancel;
    }

    private void txtGestureName_KeyPress(object sender, KeyPressEventArgs e)
    {
      
    }

    private void txtGestureName_KeyUp(object sender, KeyEventArgs e)
    {
      if (e.KeyCode == Keys.Enter)
      {
        GestureName = txtGestureName.Text;
        this.DialogResult = DialogResult.OK;
      }
    }

    private void GestureCreator_Load(object sender, EventArgs e)
    {
      txtGestureName.Select();
      txtGestureName.Focus();
      txtGestureName.ScrollToCaret();
    }
  }
}
